import http from "./http.js";
import config from "@/config/index.config.js";

export const getMySig = (wxuserId) => http.GET(`${config.baseUrl}tim/getMySig/${wxuserId}`);
// 获取OpenId
export const getOpenId = (data) => http.GET(`${config.baseUrl}user/getOpenId`, data);
// 获取OpenId
export const getWxInfo = (data) => http.GET(`${config.baseUrl}user/info`, data);
// 绑定手机号
export const getPhone = (data) => http.GET(`${config.baseUrl}user/phoneByCode`, data);
// 生成二维码
export const getInviteQrcode = (data) => http.GET(`${config.baseUrl}user/inviteCode`, data);
// 小程序授权登录
export const xcxUserLogin = (data) => http.GET(`${config.baseUrl}user/login`, data);
// 获取验证码
export const getVerifyCode = (phone) => http.POST(`${config.baseUrl}sms/getVerifyCode?phone=${phone}`);
//小程序会员充值
export const RechargeVip = (xcxOpenId) => http.POST(`${config.baseUrl}joinPay/uniPay/xcxOrderVip?xcxOpenId=${xcxOpenId}`);
//获取用户详细信息
export const getUserDetail = (id) => http.GET(`${config.baseUrl}wxuser/${id}`);
//保存小程序设置信息
export const updateInfoSetting = (data)=>http.PUT(`${config.baseUrl}wxuser/updateInfoSetting`,data);
// 获取用户信息接口
export const getUserInfo = (data) => http.GET(`${config.baseUrl}user/info`, data);
// 获取用户信息接口
export const getWxUserInfo = (wxUserId) => http.GET(`${config.baseUrl}wxuser/${wxUserId}`);
//道具购买
export const BuyDaoju = (type) => http.POST(`${config.baseUrl}joinPay/uniPay/xcxOrderDaoJuByType?type=${type}`);
//获取用户下单优惠券信息
export const getUserCoupon = (data) => http.GET(`${config.baseUrl}joinPay/uniPay/hotelOrderCouponInfo`, data);
// 用户角色切换
export const switchRole = (data) => http.GET(`${config.baseUrl}ums/switchRole`, data);

/* ***********************************************************************************开始 */
//获取区域
export const getRegion = (data) => http.GET(`${config.baseUrl}region/list`, data);
// 首页--查询轮播图
export const getBanners = (data) => http.GET(`${config.baseUrl}banner/list`, data);
//酒店订单---列表
export const orderHotel = (data) => http.GET(`${config.baseUrl}hotel/order/list`, data);
//酒店入驻start -新增
export const addHotel = (data) => http.POST(`${config.baseUrl}hotel/hotel`, data);
//入驻编辑
export const editHotel = (data) => http.PUT(`${config.baseUrl}hotel/hotel`, data);
//-入驻列表
export const listHotel = (data) => http.GET(`${config.baseUrl}hotel/hotel/list`, data);
/* start */
//酒店----列表
export const getHotelSubList = (data) => http.GET(`${config.baseUrl}hotel/sub/list`, data);
//酒店订单信息--列表
export const getOrderHotelList = (data) => http.GET(`${config.baseUrl}biz/order/list`, data);
// 查询分销订单
export const getFundOrderList = (data) => http.GET(`${config.baseUrl}biz/order/getFundOrderList`, data);
//查询酒店评价列表
export const getCommentlList = (data) => http.GET(`${config.baseUrl}hotel/comment/list`, data);
//新增酒店评价
export const addComment = (data) => http.POST(`${config.baseUrl}hotel/comment`, data);

//酒店订单支付
export const orderPay = (data) => http.POST(`${config.baseUrl}joinPay/uniPay/xcxOrderHotel`, data);
//酒店订单取消
export const cancelOrder = (data) => http.GET(`${config.baseUrl}joinPay/uniPay/cancelOrder`, data);
//用户优惠券列表
export const getCouponList = (data) => http.GET(`${config.baseUrl}coupon/receive/list​`, data);
//人才认证---新增
export const addAuthInfo = (data) => http.POST(`${config.baseUrl}auth/info`, data);
//人才认证---编辑
export const eidtAuthInfo = (data) => http.PUT(`${config.baseUrl}auth/info`, data);
//人才认证---列表
export const getAuthInfo = (data) => http.GET(`${config.baseUrl}auth/info/list`, data);
//人才酒店申请
export const authHotelApply = (data) => http.POST(`${config.baseUrl}joinPay/uniPay/authHotelApply`, data);
/* 简历start */
//查询简历列表
export const getResumeList = (data) => http.GET(`${config.baseUrl}recruit/resume/list`, data);
//保存用户简历
export const updateResume = (data) => http.POST(`${config.baseUrl}recruit/resume/updateRecruitResumeSingle`, data);
//新增用户简历
export const addResume = (data) => http.POST(`${config.baseUrl}recruit/resume/addRecruitResumeSingle`, data);
//删除简历  
export const deltelResume = (resumeId) => http.DELETE(`${config.baseUrl}recruit/resume/deleteRecruitResumeByResumeId/${resumeId}`);
//用户职位类型
export const getPositionType = (data) => http.GET(`${config.baseUrl}dict/type/recruit_user_position_type`, data);
//求职状态
export const getJobStatus = (data) => http.GET(`${config.baseUrl}dict/type/recruit_job_status`, data);
//薪资范围
export const getSalary = (data) => http.GET(`${config.baseUrl}dict/type/recruit_salary_rang`, data);
//新增---求职期望
export const addJobsInfo = (data) => http.POST(`${config.baseUrl}recruit/job`, data);
//修改---求职期望
export const eidthJobsInfo = (data) => http.PUT(`${config.baseUrl}recruit/job`, data);
//获取---求职期望-详情
export const getDetailJob = (expJobId) => http.GET(`${config.baseUrl}recruit/job/${expJobId}`);
//删除---求职期望
export const detelJobsInfo = (expJobIds) => http.DELETE(`${config.baseUrl}recruit/job/${expJobIds}`);
//新增---工作经历
export const addWorkInfo = (data) => http.POST(`${config.baseUrl}recruit/work`, data);
//修改---工作经历
export const eidtWorkInfo = (data) => http.PUT(`${config.baseUrl}recruit/work`, data);
//获取详情---工作经历
export const getDetailWorkInfo = (expWorkId) => http.GET(`${config.baseUrl}recruit/work/${expWorkId}`);
//删除---工作经历
export const deltelWorkInfo = (expWorkIds) => http.DELETE(`${config.baseUrl}recruit/work/${expWorkIds}`);
//新增---项目经历
export const addProjectInfo = (data) => http.POST(`${config.baseUrl}recruit/project`, data);
//修改---项目经历
export const eidtProjectInfo = (data) => http.PUT(`${config.baseUrl}recruit/project`, data);
//获取详情---项目经历
export const getDatileProjectInfo = (expProjectId) => http.GET(`${config.baseUrl}recruit/project/${expProjectId}`);
//删除---项目经历
export const deltelProjectInfo = (expProjectIds) => http.DELETE(`${config.baseUrl}recruit/project/${expProjectIds}`);
//新增---教育经历
export const addEduInfo = (data) => http.POST(`${config.baseUrl}recruit/edu`, data);
//修改---教育经历
export const eidtEduInfo = (data) => http.PUT(`${config.baseUrl}recruit/edu`, data);
//获取详情---教育经历
export const getDatileEduInfo = (expEduId) => http.GET(`${config.baseUrl}recruit/edu/${expEduId}`);
//删除---教育经历
export const deltelEduInfo = (expEduIds) => http.DELETE(`${config.baseUrl}recruit/edu/${expEduIds}`);
//查询简历详情
export const getResumeDetail = (resumeId) => http.GET(`${config.baseUrl}recruit/resume/${resumeId}`);
//查询招聘行业列表 
export const getIndustryList = (data) => http.GET(`${config.baseUrl}recruit/industry/list`, data);
// 查询职业列表
export const getProfessionList = (data) => http.GET(`${config.baseUrl}recruit/profession/list`, data);

//修改用户简历
//export const EidtResume = (data) => http.PUT(`${config.baseUrl}recruit/resume`, data);

/* 简历end */


/* 企业 start */
/* 查询---直聘企业信息列表 */
export const getRrecruitList = (data) => http.GET(`${config.baseUrl}recruit/enterprise/list`, data);
/* 查询---直聘企业详情 */
export const getRrecruitDetail = (enterpriseId) => http.GET(`${config.baseUrl}recruit/enterprise/${enterpriseId}`);
/* 新增---直聘我要招聘 */
export const addRecruit = (data) => http.POST(`${config.baseUrl}recruit/enterprise`, data);
/* 修改---直聘我要招聘 */
export const eidtecruit = (data) => http.PUT(`${config.baseUrl}recruit/enterprise`, data);
/* 新增企业信息 */
export const addCompanyInfo = (data) => http.POST(`${config.baseUrl}recruit/enterprise/addMainInfo`, data);
//加班情况
export const getRecruitOvertime = (data) => http.GET(`${config.baseUrl}dict/type/recruit_overtime`, data);
//休息时间
export const getRecruitResttime = (data) => http.GET(`${config.baseUrl}dict/type/recruit_resttime`, data);
//工作福利
export const getRecruitWelfare = (data) => http.GET(`${config.baseUrl}dict/type/recruit_welfare`, data);
//职位关键词
export const getKeyword = (data) => http.GET(`${config.baseUrl}recruit/keywords/list`, data);
//经验要求
export const getExpRequires = (data) => http.GET(`${config.baseUrl}dict/type/recruit_experience_requirement`, data);
//招聘类型
export const getPositionTypes = (data) => http.GET(`${config.baseUrl}dict/type/recruit_enter_position_type`, data);
//招聘学历
export const getEducational = (data) => http.GET(`${config.baseUrl}dict/type/recruit_educational_requirement`, data);
//多少薪
export const getSalaryMonth = (data) => http.GET(`${config.baseUrl}dict/type/recruit_salary_month`, data);
//查询企业职位管理列表
export const getEnterprise_jobList = (data) => http.GET(`${config.baseUrl}recruit/enterprise_job/list`, data);
//新增---企业职位
export const addEnterprise_job = (data) => http.POST(`${config.baseUrl}recruit/enterprise_job`, data);
//企业职位-----管理职位详情
export const detailEnterprise_job = (id) => http.GET(`${config.baseUrl}recruit/enterprise_job/${id}`);
//企业职位-----修改
export const eidtEnterprise_job = (data) => http.PUT(`${config.baseUrl}recruit/enterprise_job`, data);
//企业职位-----删除职位
export const deleteJob = (ids) => http.DELETE(`${config.baseUrl}recruit/enterprise_job/${ids}`);
/* 企业 end */

/* 业务员 start */
/* 查询---业务员列表 */
export const getSalesmanList = (data) => http.GET(`${config.baseUrl}salesman/list`, data);
/* 查询---业务员 */
export const getSalesmanByWxUserId = (wxUserId) => http.GET(`${config.baseUrl}salesman/detail/${wxUserId}`);
/* 新增---申请业务员 */
export const addSalesman = (data) => http.POST(`${config.baseUrl}salesman`, data);
/* 修改---申请业务员 */
export const eidSalesman = (data) => http.PUT(`${config.baseUrl}salesman`, data);
/* 登录---业务员 */
export const loginSalesman = (data) => http.POST(`${config.baseUrl}salesman/login`, data);
/* 业务员 end */
/* 商学院 start */
/* 查询---wxUserId获取商学院信息 */
export const getCollegeByWxUserId = (wxUserId) => http.GET(`${config.baseUrl}college/college/detail/${wxUserId}`);
/* 新增---商学院信息 */
export const addCollege = (data) => http.POST(`${config.baseUrl}college/college`, data);
/* 修改---商学院信息 */
export const eidCollege = (data) => http.PUT(`${config.baseUrl}college/college`, data);
/* 关注---商学院信息 */
export const focusFollow = (data) => http.POST(`${config.baseUrl}college/college/follow`, data);
/* 取消关注---商学院信息 */
export const unFollow = (data) => http.POST(`${config.baseUrl}college/college/unfollow`, data);
/* 查询---商学院类别列表 */
export const getCategoryList = (data) => http.GET(`${config.baseUrl}college/category/list`, data);
/* 发布---商学院帖子发布 */
export const addCollegePosts = (data) => http.POST(`${config.baseUrl}college/college/addPosts`, data);
/* 查询----商学院信息 */
export const getCollegeList = (data) => http.GET(`${config.baseUrl}college/college/list`, data);
/* 查询---商学院帖子 */
export const getCollegePostsList = (data) => http.GET(`${config.baseUrl}college/posts/list`, data);
/* ID查询---商学院帖子 */
export const getCollegePostsById = (id) => http.GET(`${config.baseUrl}college/posts/${id}`);
/* 查询--查询商学院点赞列表 */
export const getCollegeLikeList = (data) => http.GET(`${config.baseUrl}college/like/list`, data);
/* ID查询---增加帖子阅读量 */
export const collegeReadAdd = (id) => http.GET(`${config.baseUrl}college/posts/readAdd/${id}`);
/* ID查询---增加帖子分享量 */
export const collegeShareAdd = (id) => http.GET(`${config.baseUrl}college/posts/shareAdd/${id}`);
/* 查询--商学院回复列表 */
export const getCollegeCommentList = (data) => http.GET(`${config.baseUrl}college/comment/list`, data);
/* 新增---新增商学院评论 */
export const addCollegeComment = (data) => http.POST(`${config.baseUrl}college/comment`, data);
/* 新增---新增商学院点赞 */
export const addCollegeLike = (data) => http.POST(`${config.baseUrl}college/like`, data);
/* 商学院 end */

/* 宅部落 */
/* 查询--部落类别列表 */
export const getTribeCategoryList = (data) => http.GET(`${config.baseUrl}tribe/category/list`, data);
/* 发布---部落帖子发布 */
export const addTribePosts = (data) => http.POST(`${config.baseUrl}tribe/posts`, data);
/* 查询---部落帖子 */
export const getTribePostsList = (data) => http.GET(`${config.baseUrl}tribe/posts/list`, data);
/* ID查询---部落帖子 */
export const getTribePostsById = (id) => http.GET(`${config.baseUrl}tribe/posts/${id}`);
/* ID查询---增加帖子阅读量 */
export const tribeReadAdd = (id) => http.GET(`${config.baseUrl}tribe/posts/readAdd/${id}`);
/* ID查询---增加帖子分享量 */
export const tribeShareAdd = (id) => http.GET(`${config.baseUrl}tribe/posts/shareAdd/${id}`);
/* 查询--部落回复列表 */
export const getTribeCommentList = (data) => http.GET(`${config.baseUrl}tribe/comment/list`, data);
/* 新增---新增部落评论 */
export const addTribeComment = (data) => http.POST(`${config.baseUrl}tribe/comment`, data);
/* 查询--查询部落点赞列表 */
export const getTribeLikeList = (data) => http.GET(`${config.baseUrl}tribe/like/list`, data);
/* 新增---新增部落点赞 */
export const addTribeLike = (data) => http.POST(`${config.baseUrl}tribe/like`, data);
/* 删除---删除部落点赞 */
export const deleteLike = (likeId) => http.DELETE(`${config.baseUrl}tribe/like/${likeId}`);
/* 宅部落 end */

/* 字典查询 */
export const getDictTypeList = (dictType) => http.GET(`${config.baseUrl}dict/type/${dictType}`);

/* 配置查询 */
export const getConfigList = (data) => http.GET(`${config.baseUrl}recruit/config/list`, data);

// 获取用户积分余额
export const getUserScore = (wxUserId) => http.GET(`${config.baseUrl}scoreDetail/scoreDetail/getUserScore/${wxUserId}`);
// 查询用户积分明细
export const getUserScoreDetail = (data) => http.GET(`${config.baseUrl}scoreDetail/scoreDetail/list`, data);
// 邀请信息判断
export const inviteJudge = (data) => http.POST(`${config.baseUrl}distribute/invite/inviteJudge`, data);
// 邀请信息判断
export const getInviteInfo = (wxUserId) => http.GET(`${config.baseUrl}distribute/invite/detail/${wxUserId}`);
// 二级团队
export const findTInviteInfo = (data) => http.GET(`${config.baseUrl}distribute/invite/findTInviteInfo`, data);
// 一级团队
export const findFirstTInviteInfo = (data) => http.GET(`${config.baseUrl}distribute/invite/findFirstTInviteInfo`, data);
// 用户返现信息
export const cashBackInfo = (data) => http.GET(`${config.baseUrl}distribute/fundFlow/cashBackInfo`, data);
// 用户返现明细
export const fundFlowInfo = (data) => http.GET(`${config.baseUrl}distribute/fundFlow/list`, data);
// 增加资金记录
export const sendTransfer = (data) => http.GET(`${config.baseUrl}distribute/fundFlow/sendTransfer`, data);


// 用户协议---隐私协议
export const getProtocolList = (data) => http.GET(`${config.baseUrl}sys/protocol/list`, data);









/******************************************************************************************************************************************/



// 关于我们
export const getAboutUs = (data) => http.GET(`${config.baseUrl}cms/aboutUs/detail`, data);
// 联系我们
export const getContactUs = (data) => http.GET(`${config.baseUrl}cms/contactUs/detail`, data);
// 平台说明内容
export const getHelpDetail = (data) => http.GET(`${config.baseUrl}cms/help/detail`, data);
// 查询公告列表
export const getNoticeList = (data) => http.GET(`${config.baseUrl}cms/notice/list`, data);
// 查询公告列表
export const getNoticeDetail = (data) => http.GET(`${config.baseUrl}cms/notice/detail`, data);
// 添加意见反馈
export const getFeedbackAdd = (data) => http.GET(`${config.baseUrl}cms/feedback/add`, data);



/* // 查询职位列表
export const getPostList = (data) => http.GET(`${config.baseUrl}/bms/getPostList`, data); */
// 查询福利列表
export const getWelfareList = (data) => http.GET(`${config.baseUrl}bms/getWelfareList`, data);
// 查询职位列表
export const getPostPageList = (data) => http.GET(`${config.baseUrl}bms/getPostPageList`, data);

// 查询简历信息

// 查询简历完整信息
export const getResume = (data) => http.GET(`${config.baseUrl}wms/getResume`, data);
// 查询简历基本信息
//export const getResumeInfo = (data) => http.GET(`${config.baseUrl}/wms/getResumeInfo`, data);
//更新简历基本信息
export const updateResumeBasic = (data) => http.POST(`${config.baseUrl}wms/updateResumeBasic`, data);

// 查询期望职位列表
export const getJobExpectList = (data) => http.GET(`${config.baseUrl}wms/getJobExpectList`, data);
// 查询期望职位详情
//export const getJobExpectDetail = (data) => http.GET(`${config.baseUrl}/wms/getJobExpectDetail`, data);
// 新增/更新期望职位
export const updateJobExpect = (data) => http.POST(`${config.baseUrl}wms/updateJobExpect`, data);


// 查询工作经历列表
export const getWorkExpList = (data) => http.GET(`${config.baseUrl}wms/getWorkExpList`, data);
// 查询工作经历详情
//export const getWorkExpDetail = (data) => http.GET(`${config.baseUrl}/wms/getWorkExpDetail`, data);
// 新增/更新工作经历
export const updateWorkExp = (data) => http.POST(`${config.baseUrl}wms/updateWorkExp`, data);
// 删除工作经历
export const deleteWorkExpById = (data) => http.GET(`${config.baseUrl}wms/deleteWorkExpById`, data);

// 查询项目经历列表
export const getProExpList = (data) => http.GET(`${config.baseUrl}wms/getProExpList`, data);
// 查询项目经历详情
export const getProExpDetail = (data) => http.GET(`${config.baseUrl}wms/getProExpDetail`, data);
// 新增/更新项目经历
export const updateProExp = (data) => http.POST(`${config.baseUrl}wms/updateProExp`, data);
// 删除项目经历
export const deleteProExpById = (data) => http.GET(`${config.baseUrl}wms/deleteProExpById`, data);

// 查询教育经历列表
export const getEduExpList = (data) => http.GET(`${config.baseUrl}wms/getEduExpList`, data);
// 查询教育经历详情
export const getEduExpDetail = (data) => http.GET(`${config.baseUrl}wms/getEduExpDetail`, data);
// 新增/更新教育经历
export const updateEduExp = (data) => http.POST(`${config.baseUrl}wms/updateEduExp`, data);
// 删除教育经历
export const deleteEduExpById = (data) => http.GET(`${config.baseUrl}wms/deleteEduExpById`, data);

// 查询公司列表
export const getCompanyList = (data) => http.GET(`${config.baseUrl}rms/getCompanyList`, data);
// 新增/更新公司信息
export const updateCompany = (data) => http.POST(`${config.baseUrl}rms/updateCompany`, data);
// 查询公司信息
export const getCompanyDetail = (data) => http.GET(`${config.baseUrl}rms/getCompanyDetail`, data);
// 新增/更新职位信息
export const updatePosition = (data) => http.POST(`${config.baseUrl}rms/updatePosition`, data);
// 查询职位信息
export const getPositionDetail = (data) => http.GET(`${config.baseUrl}rms/getPositionDetail`, data);
// 查询公司职位列表
export const getCompanyPositionList = (data) => http.GET(`${config.baseUrl}rms/getCompanyPositionList`, data);
// 删除公司职位
export const deletePositionById = (data) => http.GET(`${config.baseUrl}rms/deletePositionById`, data);
// 查询职位列表
export const getPositionList = (data) => http.GET(`${config.baseUrl}rms/getPositionList`, data);

export const getUserSig = (data) => http.GET(`${config.baseUrlIm}tim/getUserSig/${data.openid}`, data);


// 用户登录
export const postLogin = (data) => http.POST(`${config.baseUrl}ums/xcxUserLogin`, data);

// 校验注册验证码
export const postRegCode = (data) => http.POST(`${config.baseUrl}register/verifySMSCode`, data);

// 获取卡片信息
export const getCardBin = (data) => http.GET(`${config.baseUrl}card/getCardBin`, data);

// 图片上传
export const upload = (data) => http.POST(`${config.baseUrl}register/upImg`, data);

// 图片下载
export const downloadImg = (data) => http.GET(`${config.baseUrl}my/downloadImg`, data);
